You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Agda source of truth for the repaired recovery invariants of hyperpolymath/squeakwell (database recovery through cross-modal constraint propagation on VeriSimDB; route plan rungs R3, R8, R9, R12, R13). Rocq recheck: verisimdb formal/Recovery.v (verisimdb#350). Lean side: tropical-types Resource/HubCeiling.lean (tropical-types#67). This also lands the "join-semilattice of partial sections" abstraction that verisimdb's CROSS-REPO-MAP.adoc flagged as the missing echo-types companion to Octad.v R1–R3.
What lands
EchoPartialSection.agda (Tier 1: Echo + stdlib). Partial sections (m : M) → Maybe (V m) of a modality bundle — the octad is an instance. Information order (⊑-refl, ⊑-trans). Resolve-parametric merge with the pointwise R1–R3 twins of Octad.v (merge-comm / merge-assoc / merge-idem: implications from resolve, not CRDT laws). Guarded fill as the left-biased merge against an oracle proposal: fill-guarded, fill-inflationary, and the counter-model FillNotMonotone.fill-not-monotone (two modalities). Restriction to an observed mask and its Echo fibre: restrict-echo, restrict-fibre-agree (a candidate in Echo (restrict T) obs reproduces obs on every observed modality — the fragment-granularity observation-fidelity shape), restrict-blind. Every law is pointwise; no funext.
EchoFibreIntersection.agda (Tier 2: Echo + EchoFiberCount). fibre-intersection-iso : Echo < f , g > (y , z) ↔ Narrow f g y z (K-free, refl round-trips). Forgetting or adding a constraint keeps the witness (forget-*-witness, narrow-fin-step-to/from + witness lemmas; the Fin n step is deliberately not a _↔_, since the function-side round trip would need funext). narrow-shrinks: on a finite domain with decidable equality, FiberSize-fin < f , g > (y , z) ≤ FiberSize-fin f y (via dec-×, lock-step with the count's recursion).
EchoTruncation.agda wired. Until now compiled only through its corollaries; now in All.agda and pinned (isProp, echo-witnesses-distinct, preimages⇒distinct-echoes, echo-not-prop). With FiberSize-fin≡0⇒no-echo / no-echo⇒FiberSize-fin≡0 it is the review-queue completeness kernel (R13 theory half).
Not claimed: inhabitation of the narrowed fibre; "covering masks ⇒ subsingleton" (needs extensionality over opaque identifiers — dropped in the route plan); termination of the recovery round (Rocq-only, needs the finite octad: iter_9_fixpoint in Recovery.v).
…Truncation (squeakwell R3/R8/R9/R12/R13)
The Agda source of truth for the repaired recovery invariants of
hyperpolymath/squeakwell (database recovery through cross-modal
constraint propagation on VeriSimDB), rechecked in Rocq as verisimdb
formal/Recovery.v (verisimdb#350) with the Lean side in tropical-types
Resource/HubCeiling.lean (tropical-types#67).
- EchoPartialSection.agda (Tier 1: Echo + stdlib). Partial sections
(m : M) → Maybe (V m) of a modality bundle — the octad as an instance;
the information order (refl, trans); the resolve-parametric merge
with the pointwise R1–R3 twins of Octad.v (merge-comm / merge-assoc /
merge-idem, implications from resolve, not CRDT laws); guarded fill
as the left-biased merge against an oracle proposal — never
overwrites (fill-guarded), inflationary (fill-inflationary), and NOT
monotone (FillNotMonotone.fill-not-monotone, two-modality
counter-model); restriction to an observed mask and its Echo fibre
(restrict-echo, restrict-fibre-agree, restrict-blind — the
fragment-granularity observation-fidelity shape). Funext-free: every
law is pointwise.
- EchoFibreIntersection.agda (Tier 2: Echo + EchoFiberCount). Binary
narrowing is the fibre of the pairing (fibre-intersection-iso, a
K-free _↔_ with refl round-trips); forgetting or adding a constraint
keeps the witness (forget-*-witness, narrow-fin-step-to/from and
their witness lemmas); on a finite domain the honest count never
grows when an observation is added (narrow-shrinks, via dec-× and
lock-step recursion with FiberSize-fin). Not claimed: inhabitation,
or "covering masks ⇒ subsingleton" (needs extensionality).
- EchoTruncation.agda, until now compiled only through its example
corollaries, is wired into All.agda and pinned (isProp,
echo-witnesses-distinct, preimages⇒distinct-echoes, echo-not-prop) —
with the FiberSize-fin ≡ 0 ⇔ ¬Echo pair it is the review-queue
completeness kernel.
Docs: echo-kernel-note classification row, MAP Direction "Database
recovery — squeakwell / VeriSimDB bridge", bridge-status Tracks row and
revision entry, CHANGELOG Added entry.
Verified here with the CI-pinned toolchain (Agda 2.7.0.1, agda-stdlib
8326c74, absolute-zero f486c29): both new modules, All.agda and
Smoke.agda exit 0 under --safe --without-K --cubical-compatible
(warnings: UnsupportedIndexedMatch only, as the existing suite emits);
zero postulates; scripts/kernel-guard.sh PASS.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDizuhJtQDcxHxM2wj8
Added formal results for partial sections, information ordering, guarded filling, observed-mask restriction and their associated witness fibres.
Added binary and finite-family narrowing results, including witness-preserving steps and a bound on how much paired constraints can reduce a fibre.
Documentation
Updated proof maps and cross-project status records with the recovery-ladder results, verification checks and limitations.
Added the new proof modules to the project’s imports and smoke checks.
The change adds Agda proofs for partial sections and fibre intersections. It imports and pins the recovery modules, including EchoTruncation, and updates documentation with the results, cross-repository status and stated limits.
Changes: Recovery proofs
Layer / File(s)
Summary
Partial-section operations and properties proofs/agda/EchoPartialSection.agda, docs/echo-types/MAP.adoc
Defines an information order, resolver-parametric merge, guarded fill and observed-mask restriction. The proofs show that fill is inflationary but not generally monotone, and establish the stated restriction-fibre properties.
Fibre intersection and narrowing proofs/agda/EchoFibreIntersection.agda, docs/echo-types/MAP.adoc
Defines binary and finite-family narrowing. The proofs establish the paired-fibre correspondence, witness-preserving conversions and the finite-fibre count bound.
Module integration and recovery records proofs/agda/All.agda, proofs/agda/Smoke.agda, proofs/agda/EchoTruncation.agda, CHANGELOG.adoc, docs/bridges/cross-repo-bridge-status.adoc, docs/echo-types/MAP.adoc, docs/echo-types/echo-kernel-note.adoc
Imports the recovery modules into All.agda and pins selected names in Smoke.agda. The documentation records the stated proof results, checks, related implementations and limits.
hyperpolymath/echo-types#365: Both address finite recovery properties for observation fibres; this PR adds a bound for narrowing by another observation.
Merge Risk: Minimal · up to 3d02d
This change adds proofs and documentation, and no runtime behavior changes. The status wording could be tightened, but it does not block merging.
Pre-merge checks: 5
Check name
Status
Explanation
Title check
The title names the two new Agda modules and the EchoTruncation wiring, which are the main changes. It is long, but it is specific and relevant.
Description check
The description explains the Agda modules, their proof results, the truncation wiring, and the reported verification. It is related to the changeset.
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (8 skipped: 8 unsupported.)
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
…onest wording; PROOF-STATUS ledger (#80)
## Summary
This PR has four commits.
1. Fixes the Codex review findings that arrived on
[#78](#78)
after it merged. Two were P1: rollback destroyed every batch, and the
Containerfile built nothing. The rest were P2 wording and placeholder
items.
2. Adds the proof ledger `PROOF-STATUS.adoc`, which
README-EXPLAINME-STANDARD section 5 requires before any proof is
claimed. The first rungs of the proof ladder now have prover-checked
artefacts in other repositories.
3. Two rounds of CodeRabbit review fixes. The main ones: batch volumes
each get their own VeriSimDB session, the VeriSimDB URL no longer
appears in logs, and an empty URL now behaves like an unset one. The
ledger's axiom attributions were corrected after a per-lemma re-check.
## Changes
- **P1 rollback (`container/deploy.k9.ncl`)**: each recovery batch runs
on its own named volume `squeakwell-data-<BATCH_ID>`. The default ID is
the UTC time plus the shell's PID, so two batches started in the same
second still differ. Rollback requires `BATCH_ID`, inspects that one
volume and removes only it. The one-line recipes stop with an error if
`BATCH_ID` or `VERISIMDB_URL` is unset.
- **P1 build (`container/Containerfile`, `container/entrypoint.sh`)**: a
wolfi builder stage runs `cargo build --release --locked`, and the
runtime stage copies only the binary. squeakwell is a batch job, so
`EXPOSE`, `HEALTHCHECK` and `APP_PORT` are removed. The entrypoint runs
`/app/squeakwell "$@"`.
- **Per-batch VeriSimDB session (`src/engine/mod.rs`)**: the session ID
is derived from `SQUEAKWELL_BATCH_ID` when it is set. Without this,
every batch mounts its volume at `/data` and they would all share one
session ID. `compose.toml` and the k9 component pass `BATCH_ID` through.
Without a batch ID the session ID still comes from the workdir path, as
before.
- **VeriSimDB URL handling**: the entrypoint logs only the scheme and
host of `VERISIMDB_URL`, with userinfo, path and query stripped. It also
says whether the variable is unset or set to an empty string. The client
treats an empty or blank URL as unset.
- **P2 placeholders**: every `{{TOKEN}}` in `container/` is now filled
in:
- `manifest.toml`: no listening sockets.
- `vordr.toml`: no HTTP probe.
- `compose.toml`: one batch service and one volume per batch.
- `ct-build.sh`, `.gatekeeper.yaml`, `container/README.adoc` and its AI
manifest.
- **Wording**: README, EXPLAINME, `STATE.a2ml`, PROOF-NEEDS and
TEST-NEEDS are corrected:
- The gate ceiling is L6, and Phase 5 adds no level.
- VCL-UT gating is planned. The current stub does not invoke the gate.
- No proof lives in this repo, and the Rust engine is unproved.
- The hub-ceiling results are theory only; how they apply to f64
confidence is open.
- The Zig FFI template is deleted.
- **`PROOF-STATUS.adoc` (new)**: one row per rung R0–R18, using the
estate status vocabulary and naming the backing artefact. A row is
PROVEN or PROVEN-WITH-AXIOMS only where a prover ran:
- **Rocq:**
[verisimdb#350](hyperpolymath/verisimdb#350).
Each `Print Assumptions` result is recorded per lemma.
- **Agda:**
[echo-types#370](hyperpolymath/echo-types#370).
- **Lean:**
[tropical-types#67](hyperpolymath/tropical-types#67).
R0, R1, R11, R15 and R16 and the Creusot halves are OPEN, and R17 is
ASSUMED. Each row has a receipt giving the toolchain, command and
result.
## Testing
```
cargo test # 29 passed, 0 failed
cargo clippy --all-targets # clean
shellcheck -s sh container/entrypoint.sh # clean
```
Further checks:
- **Container config:** new tests in `tests/container_config_test.rs`
parse compose, manifest and vordr. They pin the batch service shape,
`VERISIMDB_URL`, `SQUEAKWELL_BATCH_ID`, the per-batch volume and its
declaration.
- **k9 one-line recipes:** run with `BATCH_ID` unset they exit 2; with
it set they expand correctly.
- **Entrypoint redaction:** `https://user:s3cret@host:8443/v1?token=abc`
is logged as `https://host:8443`.
Not run here: the image build itself (`podman build`), because podman is
not available in this environment.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01J4QvDizuhJtQDcxHxM2wj8
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
239-239: Minor · Functional Correctness · Quick win
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Remove the join-semilattice claim.
Under EchoPartialSection._⊑_, two sections with different present values at one modality have no common upper bound. merge-comm, merge-assoc and merge-idem prove pointwise algebraic laws only when the resolver has those laws. They do not make merge a join under _⊑_. Describe the resolver-parametric merge laws without calling this abstraction a join-semilattice. (raw.githubusercontent.com)
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 1399d425-2cf9-4166-8ec9-5dd42eee11b6
Commits
Reviewing files that changed from the base of the PR and between 9b70faa and 3d02de0.
Files selected for processing: 8
CHANGELOG.adoc
docs/bridges/cross-repo-bridge-status.adoc
docs/echo-types/MAP.adoc
docs/echo-types/echo-kernel-note.adoc
proofs/agda/All.agda
proofs/agda/EchoFibreIntersection.agda
proofs/agda/EchoPartialSection.agda
proofs/agda/Smoke.agda
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Review details
Context from checks skipped due to timeout: 2
GitHub Check: CodeRabbit
GitHub Check: cold-check
Additional context used
Learnings: 2
Common learnings
Learnt from: CR
Repo: hyperpolymath/echo-types PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-10-31T20:51:46.566Z
Learning: Source excerpt:
# Working rules in this repo
- Every new module goes into `All.agda` as an `open import` so the
verified suite covers it. Orphan modules that compile but are not
in `All.agda` are treated as dead code.
Learnt from: CR
Repo: hyperpolymath/echo-types PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-10-20T14:32:49.454Z
Learning: Source excerpt:
# Working rules in this repo
- No postulates unless explicitly isolated and justified.
Learnt from: CR
Repo: hyperpolymath/echo-types PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-10-31T20:51:46.566Z
Learning: Source excerpt:
# Working rules in this repo
- `--safe --without-K` throughout.
Learning: 2026-11-04T17:52:29.962Z
Learnt from: CR
Repo: hyperpolymath/echo-types PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-11-04T17:52:29.962Z
Learning: Source excerpt:
# Proof policy
The normative estate policy is
https://github.com/hyperpolymath/standards/blob/main/3-practice/PROOF-POLICY.adoc.
Its default Agda theory profile is `--safe --without-K --cubical-compatible`;
full Cubical proofs require a separate reviewed profile. Record toolchain,
assumptions, results and exact source revisions; historical checks do not
prove the new profile. Mathesis grades are theorem- and receipt-specific.
Applied to files:
proofs/agda/EchoFibreIntersection.agda
Additional comments: 8
proofs/agda/EchoPartialSection.agda: 1
1-260: LGTM!
docs/echo-types/MAP.adoc: 1
515-553: LGTM!
proofs/agda/EchoFibreIntersection.agda: 1
1-230: LGTM!
proofs/agda/All.agda: 1
53-58: LGTM!
proofs/agda/Smoke.agda: 1
614-622: LGTM!
Also applies to: 624-638, 640-661
CHANGELOG.adoc: 1
10-22: LGTM!
docs/bridges/cross-repo-bridge-status.adoc: 1
571-580: LGTM!
docs/echo-types/echo-kernel-note.adoc: 1
229-240: LGTM!
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Agda source of truth for the repaired recovery invariants of hyperpolymath/squeakwell (database recovery through cross-modal constraint propagation on VeriSimDB; route plan rungs R3, R8, R9, R12, R13). Rocq recheck: verisimdb
formal/Recovery.v(verisimdb#350). Lean side: tropical-typesResource/HubCeiling.lean(tropical-types#67). This also lands the "join-semilattice of partial sections" abstraction that verisimdb'sCROSS-REPO-MAP.adocflagged as the missing echo-types companion toOctad.vR1–R3.What lands
EchoPartialSection.agda(Tier 1:Echo+ stdlib). Partial sections(m : M) → Maybe (V m)of a modality bundle — the octad is an instance. Information order (⊑-refl,⊑-trans). Resolve-parametricmergewith the pointwise R1–R3 twins ofOctad.v(merge-comm/merge-assoc/merge-idem: implications fromresolve, not CRDT laws). Guarded fill as the left-biased merge against an oracle proposal:fill-guarded,fill-inflationary, and the counter-modelFillNotMonotone.fill-not-monotone(two modalities). Restriction to an observed mask and its Echo fibre:restrict-echo,restrict-fibre-agree(a candidate inEcho (restrict T) obsreproducesobson every observed modality — the fragment-granularity observation-fidelity shape),restrict-blind. Every law is pointwise; no funext.EchoFibreIntersection.agda(Tier 2:Echo+EchoFiberCount).fibre-intersection-iso : Echo < f , g > (y , z) ↔ Narrow f g y z(K-free,reflround-trips). Forgetting or adding a constraint keeps the witness (forget-*-witness,narrow-fin-step-to/from+ witness lemmas; theFin nstep is deliberately not a_↔_, since the function-side round trip would need funext).narrow-shrinks: on a finite domain with decidable equality,FiberSize-fin < f , g > (y , z) ≤ FiberSize-fin f y(viadec-×, lock-step with the count's recursion).EchoTruncation.agdawired. Until now compiled only through its corollaries; now inAll.agdaand pinned (isProp,echo-witnesses-distinct,preimages⇒distinct-echoes,echo-not-prop). WithFiberSize-fin≡0⇒no-echo/no-echo⇒FiberSize-fin≡0it is the review-queue completeness kernel (R13 theory half).Not claimed: inhabitation of the narrowed fibre; "covering masks ⇒ subsingleton" (needs extensionality over opaque identifiers — dropped in the route plan); termination of the recovery round (Rocq-only, needs the finite octad:
iter_9_fixpointinRecovery.v).Docs
echo-kernel-note.adocclassification row ("Derived — recovery ladder (2026-11-09)");MAP.adocDirection "Database recovery — squeakwell / VeriSimDB bridge[REAL]";cross-repo-bridge-status.adocTracks row + revision entry;CHANGELOG.adocAdded entry.Verification (this environment, CI-pinned toolchain via
scripts/setup-agda.sh)Agda 2.7.0.1 (checksum-pinned), agda-stdlib
8326c7475af1fa456ca04a0203c168d5d7ff842b, absolute-zerof486c29903434589117fa0662c6f29b0f17d1d5f:Warnings are
UnsupportedIndexedMatchonly (the class the existing suite already emits). Zero postulates, no escape pragmas.Generated by Claude Code